package cn.edu.njnu.opengmpback.resource.service;


import cn.edu.njnu.opengmpback.common.dto.PageDTO;
import cn.edu.njnu.opengmpback.common.utils.JsonResult;
import cn.edu.njnu.opengmpback.resource.entity.ModelItem;
import cn.edu.njnu.opengmpback.resource.entity.UserData;
import cn.edu.njnu.opengmpback.resource.entity.dto.*;
import cn.edu.njnu.opengmpback.user.entity.UserEntity;
import cn.edu.njnu.opengmpback.user.entity.UserVo;
import com.alibaba.fastjson.JSONArray;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface UserResService {

    JsonResult createFolder(CreateFolderDTO createFolderDTO, String userId);

    JsonResult saveDataItem(MultipartFile [] multipartFile, DataItemDTO dataItemDTO, String userId);

    JsonResult updateUserDataItem(UpdateUserDataItemDTO updateUserDataItemDTO);

    JsonResult updateUserFolder(UpdateFolderDTO updateFolderDTO);

    JsonResult getUserResource(String parentId,String userId);

    JsonResult getUserAllResource(String userId);

    JsonResult deleteFolder(String folderId);

    JsonResult deleteDataItem(String dataItemId);

    void downloadDataItem(String dataItemId, HttpServletResponse response);

    JsonResult getAllPublicUserData();

    JsonResult saveModel(CreateResourceModelDTO createResourceModelDTO, MultipartFile imgFile, String userId);

    JsonResult removeModelItem(String modelItemId, String userId);

    JsonResult getModelItemByUserId(String userId);

    JsonResult updateModel(UpdateResourceModelDTO updateResourceModelDTO, MultipartFile imgFile);

    JsonResult getProjectsByUserId(String userId, PageDTO pageDTO);

    JsonResult updateMethod(UpdateResourceMethodDTO updateResourceMethodDTO, MultipartFile imgFile);

    JsonResult saveMethod(CreateResourceMethodDTO createResourceMethodDTO, MultipartFile imgFile, String userId);

    JsonResult modelItemToProject(String projectId, List<String> modelItemList, String userId);

    JsonResult saveBigFileData(DataItemDTO dataItemDTO, UserVo userVo);

    JsonResult publishData(CreateResourceDataDTO createResourceDataDTO, List<Map<String, String>> files);

}
